package com.geeguo.ebuilder.operation.controller.tenant.datasourceinfo;

import com.geeguo.ebuilder.core.common.action.ActionResult;
import com.geeguo.ebuilder.operation.business.tenant.datasourceinfo.model.DataSourceInfoVO;
import com.geeguo.ebuilder.operation.business.tenant.datasourceinfo.service.DataSourceInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "数据源信息")
@RestController
public class DataSourceInfoController {

    @Autowired
    private DataSourceInfoService dataSourceInfoService;

    @Operation(summary = "根据ID查询数据源信息")
    @GetMapping("/tenant/dataSourceInfo/get/{id}")
    public ActionResult<DataSourceInfoVO> get(@PathVariable("id") String id) {
        return ActionResult.success(dataSourceInfoService.get(id));
    }
}
